#include <iostream>
#include <string>
using namespace std;

class Person {
public:
    int m_age;
    string m_name;
    Person (string name , int age) {
        m_name = name;
        m_age = age;
    }

    bool operator==(const Person &p) {
        if (m_name == p.m_name && m_age == p.m_age) {
            return true;
        }
        return false;
    }
    bool operator!=(const Person &p) {
        if (m_name == p.m_name && m_age == p.m_age) {
            return false;
        }
        return true;
    }
};

int main() {
    Person p1("张三" , 17);
    Person p2("张三" , 17);
    if (p1 == p2) {
        cout << "p1和p2相等" << endl;
    } else {
        cout << "p1和p2不相等" << endl;
    }
    if (p1 != p2) {
        cout << "p1和p2不相等" << endl;
    } else {
        cout << "p1和p2相等" << endl;
    }
    return 0;
}